<?php
namespace app\api\validate;

use think\Validate;

class Backlog extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'title'                         => 'require',
        'content'                       => 'require',
        'work_uid'                      => 'require',
        'range'                         => 'require|number',
        'images'                        => 'array',
            'id'                        => 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'title.require'                   => '标题不能为空',
        'content.require'                 => '内容不能为空',
        'work_uid.require'                => '办事人不能为空',
        'range.require'                   => '时效不能为空',
        'range.number'                    => '时效只能是数字',
    ];

    /**
     * 字段描述
     */
    protected $field = [

    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'edit'  => ['title','content','work_uid','range'],
        'finish'  => ['id','images'],
    ];

}
